class ArrayNeighbors{
	public static void main(String[] args) {
		UserInput input = new UserInput();
		long minDiff = (long)Integer.MAX_VALUE - (long)Integer.MIN_VALUE;
		long diff;
		
		int arrLength = input.getLength("Please enter number of elements in the array:");
		int[] array = new int[arrLength];
		int index = 0;
		array[0] = input.getInteger("Enter number 1:");
		for (int i = 1; i < arrLength; i = i + 1) {
			array[i] = input.getInteger("Enter number " + i + ":");
			diff = Math.abs(array[i] - array[i - 1]);
			if (diff < minDiff) {
				minDiff = diff;
				index = i - 1 ;
			}
			if (diff == 0) {
				System.out.println("Can't wait any more!!!");
				index = i;
				break;
			}
		}
		System.out.println("Index: " + index);
		System.out.println("Value: " + array[index]);
	}
}